# - Find Life
# This module looks for Life (Library for the Finite Element Method) support
# it will define the following values
#SET(LIFE_DIR /home/vincent/LIFE-LJKFORGE/life)
#SET(LIFE_DIR /usr/local/life-install/)
SET(LIFE_DIR /home/chabanne/LIFE-LJKFORGE/life-install)
SET(LIFE_FOUND 0)
FIND_PATH(LIFE_INCLUDE_DIR lifeconfig.h  PATHS ${LIFE_DIR}/include NO_DEFAULT_PATH )

FIND_LIBRARY(LIFE_LIBRARY        life        PATHS ${LIFE_DIR}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIFECORE_LIBRARY    lifecore    PATHS ${LIFE_DIR}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIFEALG_LIBRARY     lifealg     PATHS ${LIFE_DIR}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIFEMESH_LIBRARY    lifemesh    PATHS ${LIFE_DIR}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIFEDISCR_LIBRARY   lifediscr   PATHS ${LIFE_DIR}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIFEFILTERS_LIBRARY lifefilters PATHS ${LIFE_DIR}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIFEMATERIAL_LIBRARY lifematerial PATHS ${LIFE_DIR}/lib NO_DEFAULT_PATH)


SET(LIFE_LIBRARIES
   ${LIFE_LIBRARY}
   ${LIFEMATERIAL_LIBRARY} ${LIFEFILTERS_LIBRARY} ${LIFEDISCR_LIBRARY} ${LIFEMESH_LIBRARY}  ${LIFEALG_LIBRARY} ${LIFECORE_LIBRARY} )

IF(LIFE_INCLUDE_DIR AND LIFE_LIBRARIES)
   SET(LIFE_FOUND 1)
ENDIF(LIFE_INCLUDE_DIR AND LIFE_LIBRARIES)

MARK_AS_ADVANCED(
  LIFE_LIBRARY
  LIFECORE_LIBRARY
  LIFEALG_LIBRARY
  LIFEMESH_LIBRARY
  LIFEDISCR_LIBRARY
  LIFEFILTERS_LIBRARY
  LIFEMATERIAL_LIBRARY
  )
